package com.zpark.sports.service.impl;

import com.zpark.sports.mapper.IUserMapper;
import com.zpark.sports.pojo.Empty;
import com.zpark.sports.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserMapper userMapper;
/*
* 添加一个用户
* @param empty用户数据
* @return 受影响的行数
* */

    @Override
    public Integer addEmpty(Empty empty){
        return userMapper.insertEmpty(empty);
    }

    @Override
    public Integer removeEmptyById(Integer id) {
        return userMapper.deleteEmptyById(id);
    }

    @Override
    public Integer changeEmptyById(Empty empty) {
        return userMapper.updateEmptyById(empty);
    }

    @Override
    public List<Empty> findAllEmpty() {
        return userMapper.selectAllEmpty();
    }

    /*
     * 根据用户id删除用户数据
     * @param id用户id
     * @return 受影响的行数
     * */


}
